package com.founder.devwork.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.founder.devwork.dto.AuthorStatsDTO;
import com.founder.devwork.dto.MonthlyStatDTO;
import com.founder.devwork.dto.ProjectSummaryDTO;
import com.founder.devwork.dto.RepositorySummaryDTO;
import com.founder.devwork.entity.Project;
import java.util.List;

/**
 * 项目服务接口
 */
public interface ProjectService extends IService<Project> {
    /**
     * 获取项目关联的仓库
     * @param id
     * @return
     */
    List<RepositorySummaryDTO> getRepositoryByProjectId(String id);

    /**
     * 删除项目和关联的仓库关系
     * @param projId
     */
    void removeProjWithRelationOfRepoByProjId(String projId);

    IPage<ProjectSummaryDTO> getProjectSummaries(IPage<ProjectSummaryDTO> page, String name, String sortBy, String sortDir);

    List<MonthlyStatDTO> getProjectMonthlyStats(String projectId);

    List<AuthorStatsDTO> getProjectAuthorStats(String projectId);
}
